package com.health.dao;

import com.health.pojo.Permission;
import com.health.pojo.Role;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

/**
 * @Classname SetmealDao
 * @Description TODO
 * @Version 1.0.0
 * @Date 2023/3/16 14:47
 * @Author RainGrd
 */
public interface PermissionDao {


    int insertPermission(Permission permission);

    long selectSetmealAndCheckGroupRelation(long id);


    List<Permission> selectPermissionsByCondition(@Param("queryString") String queryString);


    long selectTotalByPermissionId(@Param("queryString") String queryString);

    Set<Permission> findByRoleId(Integer roleId);


    Set<Role> selectRolesByPermissionId(@Param("permissionId") Integer id);

    void insertPermissionAndRole(@Param("permission_id") Integer permission, @Param("role_id") Integer roleId);

    void deleteAssociation(@Param("permission_id") Integer id);

    int updatePermission(Permission permission);

    List<Integer> selectRoleIdsByPermissionId(@Param("permission_id") Integer permissionId);

    int deletePermission(@Param("permissionId") Integer permissionId);






/*
    List<CheckGroup> selectAll();





    long selectCheckGroupCountById(long id);


    int updateCheckGroup(CheckGroup checkGroup);

    int deleteCheckGroup(long id);

    int insertCheckGroupAndCheckItem(@Param("checkgroup_id") Integer checkGroupId, @Param("checkitem_id") Integer checkItemId);

    List<Integer> selectCheckItemIdsByCheckGroupId(@Param("checkgroup_id") Integer id);

    int deleteAssociation(@Param("checkgroup_id") Integer id);*/

}
